<?php

namespace App\Http\Admin\Controllers\Alimama;



use App\Http\Admin\Services\Alimama\OrderService;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;



class OrderController extends Controller
{
    protected $service;

    public function __construct(OrderService $orderService)
    {
        $this->service = $orderService;
    }

    /*
     * 入口
     * */
    public function index(){
        return view('alimama.alimama_list');
    }



    /*
     * 订单导入 阿里妈妈
     * */
    public function import(Request $request)
    {
        $this->service->import();
        return res('导入完成');
    }


    /*
     * 订单统计
     * */
    public function list(Request $request){
        $conditions = $request->all();
        $result = $this->service->list($conditions);
        return res('供应链评级',$result);
    }

    /*
     * 订单列表
     * */
    public function orderList(Request $request){
        $conditions = $request->all();
        $result = $this->service->orderList($conditions);
        return res('订单列表',$result);
    }

}